export default {
    path: "/",
    name: "Layout",
    redirect: "/",
    component: () =>
        import(/* webpackChunkName: "layout" */ "@/layout/index.vue"),
    meta: {
        role: ["common", "admin"],
        title: "首页",
    },
    children: [
        {
            path: "/",
            name: "HomePage",
            component: () =>
                import(/* webpackChunkName: "home" */ "@/views/home/index.vue"),
            meta: {
                isShow: true,
                title: "默认首页",
                parentPath: "Layout",
                role: ["common", "admin"],
            },
        },
        {
            path: "/pdf",
            name: "PdfPage",
            component: () =>
                import(/* webpackChunkName: "pdf" */ "@/views/pdf/index.vue"),
            meta: {
                title: "打印模块",
                parentPath: "Layout",
                isShow: true,
            },
        },
        {
            path: "/mark",
            name: "markPage",
            component: () =>
                import(
                    /* webpackChunkName: "waterMark" */ "@/views/watermark/index.vue"
                ),
            meta: {
                title: "水印模块",
                parentPath: "Layout",
                isShow: true,
            },
        },
        {
            path: "/p",
            name: "ParentPage",
            redirect: "/child1",
            meta: {
                isShow: true,
                title: "父菜单",
                parentPath: "Layout",
                role: ["common", "admin"],
            },
            children: [
                {
                    path: "/child1",
                    name: "ChildPage1",
                    component: () => import("@/views/parent/menu1.vue"),
                    meta: {
                        isShow: true,
                        parentPath: "ParentPage",
                        title: "子菜单1",
                    },
                },
                {
                    path: "/child2",
                    name: "ChildPage2",
                    component: () => import("@/views/parent/menu2.vue"),
                    meta: {
                        isShow: true,
                        parentPath: "ParentPage",
                        title: "子菜单2",
                    },
                },
                {
                    path: "/child3",
                    name: "ChildPage3",
                    component: () => import("@/views/parent/menu3.vue"),
                    meta: {
                        isShow: true,
                        parentPath: "ParentPage",
                        title: "子菜单3",
                    },
                },
            ],
        },
        {
            path: "/project",
            name: "ProjectPage",
            component: () =>
                import(
                    /* webpackChunkName: "project" */ "@/views/project/index.vue"
                ),
            meta: {
                isShow: true,
                title: "项目介绍",
                parentPath: "Layout",
                role: ["common", "admin"],
            },
        },
        {
            path: "/user",
            name: "UserPage",
            component: () =>
                import(/* webpackChunkName: "user" */ "@/views/user/index.vue"),
            meta: {
                title: "用户列表",
                parentPath: "Layout",
                isShow: true,
            },
        },
        {
            path: "/role",
            name: "RolePage",
            component: () =>
                import(/* webpackChunkName: "role" */ "@/views/role/index.vue"),
            meta: {
                title: "角色列表",
                parentPath: "Layout",
                isShow: true,
            },
        },
        {
            path: "/auth",
            name: "AuthPage",
            component: () =>
                import(/* webpackChunkName: "auth" */ "@/views/auth/index.vue"),
            meta: {
                title: "权限列表",
                parentPath: "Layout",
                isShow: true,
            },
        },
    ],
};
